package com.haier.controller;

import com.haier.pojo.ClassRoom;
import com.haier.pojo.Student;
import com.haier.service.ClassRoomService;
import com.haier.service.StudentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TestController {

    @Resource
    private ClassRoomService classRoomService;
    @Resource
    private StudentService studentService;


    @RequestMapping(value = "/test1")
    public ClassRoom gettest1(Integer id){

        return classRoomService.selectClassRoom(id);
    }

    @RequestMapping(value = "/test2")
    public Student gettest2(Integer id){

        return studentService.selectStudent(id);
    }

}
